package com.zhongjian.technologycal.mall.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zhongjian.technologycal.mall.R;
import com.zhongjian.technologycal.mall.bean.CourseListBean;

import java.util.List;

/**
 * Created by wei on 2018/4/8.
 */

public class CommendAdapter extends BaseQuickAdapter<CourseListBean,BaseViewHolder> {

    public CommendAdapter(List data) {
        super(R.layout.items_horizontal_commend, data);
    }

    @Override
    protected void convert(final BaseViewHolder helper, final CourseListBean item) {
        if (item == null){
            return;
        }
//        helper.setText(R.id.college_tv_title,item.getCoursename());
//        helper.setText(R.id.college_tv_content,item.getCoursebrief());
//        helper.setText(R.id.college_tv_price,""+item.getCourseprice());
//        if(item.isCanApply() == true){
//            helper.setVisible(R.id.college_ll_buy,true);
//            if(item.getCurstatus() == 0){
//                helper.setText(R.id.college_tv_buy,"报名中");
//                helper.setBackgroundRes(R.id.college_tv_buy,R.drawable.ripple_press2);
//            }else if(item.getCurstatus() == 1){
//                helper.setText(R.id.college_tv_buy,"授课中");
//                helper.setBackgroundRes(R.id.college_tv_buy,R.drawable.ripple_pressa_order_list);
//            }
//
//        }else if(item.isCanApply() == false){
//            helper.setVisible(R.id.college_ll_buy,false);
//        }
//
//        final RequestOptions options = new RequestOptions();
//        options.fitCenter()
//                .transform(new GlideRoundTransform(mContext,5))
//                .placeholder(R.mipmap.bg_white2x)
//                .error(R.mipmap.bg_white2x);
//
//        if(item.getCoursePhotos().size() > 0){
//            Glide.with(mContext).load(BaseContacts.BASE_URL + item.getCoursePhotos().get(0).getPhoto())
//                .apply(options)
//                .thumbnail(0.1f).into((ImageView) helper.getView(R.id.college_iv_heading));
//        }

    }


}
